<!--
创建实例
数据监听
编译模板
mount
update dom when data changed
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
</body>
<script>
    new Vue({
        data: {
            a: 1
        },
        created: function () {
            //this指定vm实例
            //不要在=>箭头函数中使用this，因为箭头函数没有this，导致会向上查找this
            console.log('a is =>' + this.a)
        }
    })
</script>
</html>